from django.db import models

# Create your models here.
from users.models import User
from vne_erp.utils.base_model import BaseModel


class Torts(BaseModel):
    """侵权管理"""

    staff = models.ForeignKey(User, on_delete=models.CASCADE, verbose_name="上传者")
    # store = models.ForeignKey(StoreManagement, on_delete=models.CASCADE, verbose_name="店铺")
    tort_content = models.CharField(max_length=200, verbose_name='侵权内容')
    tort_company_ip = models.CharField(max_length=100, default='', verbose_name='侵权公司ip')
    tort_company = models.CharField(max_length=100, default='', verbose_name='侵权公司')
    tort_asin = models.CharField(max_length=30, default='', verbose_name='侵权ASIN')
    old_asin = models.CharField(max_length=30, default='', verbose_name='原ASIN')
    tort_image_url = models.CharField(max_length=200, verbose_name='侵权图片地址')
    # goods_source_url = models.CharField(max_length=200, verbose_name='')
    deal_with_tort = models.CharField(max_length=1000, default='', verbose_name='侵权处理')

    class Meta:
        db_table = 'tb_torts'
        verbose_name = '侵权管理'
        verbose_name_plural = verbose_name

    def __str__(self):
        return '%s: %s' % (self.id, self.staff)


